#include "secondwin.h"
#include "ui_secondwin.h"
#include <QDebug>
secondwin::secondwin(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::secondwin)
{
    ui->setupUi(this);
}

secondwin::~secondwin()
{
    delete ui;
}
//返回按钮
void secondwin::on_pushButton_4_clicked()
{
    //QT提供了函数parentWidget(),该函数可以返回上一级界面的地址
    QWidget *widget=this->parentWidget();
    qDebug()<<"上一级界面的地址是: "<<widget;
    //把登录界面显示
    widget->show();
    //关闭当前界面
    this->close();
}
